
/*
'===============================================================================
'  Generated From - CSharp_dOOdads_BusinessEntity.vbgen
' 
'  ** IMPORTANT  ** 
'  How to Generate your stored procedures:
' 
'  SQL        = SQL_StoredProcs.vbgen
'  ACCESS     = Access_StoredProcs.vbgen
'  ORACLE     = Oracle_StoredProcs.vbgen
'  FIREBIRD   = FirebirdStoredProcs.vbgen
'  POSTGRESQL = PostgreSQL_StoredProcs.vbgen
'
'  The supporting base class SqlClientEntity is in the Architecture directory in "dOOdads".
'  
'  This object is 'abstract' which means you need to inherit from it to be able
'  to instantiate it.  This is very easilly done. You can override properties and
'  methods in your derived class, this allows you to regenerate this class at any
'  time and not worry about overwriting custom code. 
'
'  NEVER EDIT THIS FILE.
'
'  public class YourObject :  _YourObject
'  {
'
'  }
'
'===============================================================================
*/

// Generated by MyGeneration Version # (1.3.0.3)

using System;
using System.Data;
using System.Data.SqlClient;
using System.Collections;
using System.Collections.Specialized;

using MyGeneration.dOOdads;

namespace POSSystem.DAL
{
	public abstract class _Networks : SqlClientEntity
	{
		public _Networks()
		{
			this.QuerySource = "Networks";
			this.MappingName = "Networks";

		}	

		//=================================================================
		//  public Overrides void AddNew()
		//=================================================================
		//
		//=================================================================
		public override void AddNew()
		{
			base.AddNew();
			
		}
		
		
		public override void FlushData()
		{
			this._whereClause = null;
			this._aggregateClause = null;
			base.FlushData();
		}
		
		//=================================================================
		//  	public Function LoadAll() As Boolean
		//=================================================================
		//  Loads all of the records in the database, and sets the currentRow to the first row
		//=================================================================
		public bool LoadAll() 
		{
			ListDictionary parameters = null;
			
			return base.LoadFromSql("[" + this.SchemaStoredProcedure + "proc_NetworksLoadAll]", parameters);
		}
	
		//=================================================================
		// public Overridable Function LoadByPrimaryKey()  As Boolean
		//=================================================================
		//  Loads a single row of via the primary key
		//=================================================================
		public virtual bool LoadByPrimaryKey(int ID)
		{
			ListDictionary parameters = new ListDictionary();
			parameters.Add(Parameters.ID, ID);

		
			return base.LoadFromSql("[" + this.SchemaStoredProcedure + "proc_NetworksLoadByPrimaryKey]", parameters);
		}
		
		#region Parameters
		protected class Parameters
		{
			
			public static SqlParameter ID
			{
				get
				{
					return new SqlParameter("@ID", SqlDbType.Int, 0);
				}
			}
			
			public static SqlParameter NetworkName
			{
				get
				{
					return new SqlParameter("@NetworkName", SqlDbType.NVarChar, 50);
				}
			}
			
			public static SqlParameter DealerCode
			{
				get
				{
					return new SqlParameter("@DealerCode", SqlDbType.NVarChar, 50);
				}
			}
			
			public static SqlParameter PostalAddress
			{
				get
				{
					return new SqlParameter("@PostalAddress", SqlDbType.NVarChar, 100);
				}
			}
			
			public static SqlParameter DealerManagerName
			{
				get
				{
					return new SqlParameter("@DealerManagerName", SqlDbType.NVarChar, 50);
				}
			}
			
			public static SqlParameter DealerManagerPhone
			{
				get
				{
					return new SqlParameter("@DealerManagerPhone", SqlDbType.NVarChar, 20);
				}
			}
			
			public static SqlParameter DealerManagerEmail
			{
				get
				{
					return new SqlParameter("@DealerManagerEmail", SqlDbType.NVarChar, 50);
				}
			}
			
			public static SqlParameter CommissionEnquiryName
			{
				get
				{
					return new SqlParameter("@CommissionEnquiryName", SqlDbType.NVarChar, 50);
				}
			}
			
			public static SqlParameter CommissionEnquiryPhone
			{
				get
				{
					return new SqlParameter("@CommissionEnquiryPhone", SqlDbType.NVarChar, 20);
				}
			}
			
			public static SqlParameter CommissionEnquiryEmail
			{
				get
				{
					return new SqlParameter("@CommissionEnquiryEmail", SqlDbType.NVarChar, 50);
				}
			}
			
			public static SqlParameter OtherName
			{
				get
				{
					return new SqlParameter("@OtherName", SqlDbType.NVarChar, 50);
				}
			}
			
			public static SqlParameter OtherPhone
			{
				get
				{
					return new SqlParameter("@OtherPhone", SqlDbType.NVarChar, 20);
				}
			}
			
			public static SqlParameter OtherEmail
			{
				get
				{
					return new SqlParameter("@OtherEmail", SqlDbType.NVarChar, 50);
				}
			}
			
			public static SqlParameter LastModifiedDate
			{
				get
				{
					return new SqlParameter("@LastModifiedDate", SqlDbType.DateTime, 0);
				}
			}
			
			public static SqlParameter LastModifiedByUser
			{
				get
				{
					return new SqlParameter("@LastModifiedByUser", SqlDbType.Int, 0);
				}
			}
			
			public static SqlParameter Deleted
			{
				get
				{
					return new SqlParameter("@Deleted", SqlDbType.Bit, 0);
				}
			}
			
			public static SqlParameter BranchID
			{
				get
				{
					return new SqlParameter("@BranchID", SqlDbType.Int, 0);
				}
			}
			
		}
		#endregion		
	
		#region ColumnNames
		public class ColumnNames
		{  
            public const string ID = "ID";
            public const string NetworkName = "NetworkName";
            public const string DealerCode = "DealerCode";
            public const string PostalAddress = "PostalAddress";
            public const string DealerManagerName = "DealerManagerName";
            public const string DealerManagerPhone = "DealerManagerPhone";
            public const string DealerManagerEmail = "DealerManagerEmail";
            public const string CommissionEnquiryName = "CommissionEnquiryName";
            public const string CommissionEnquiryPhone = "CommissionEnquiryPhone";
            public const string CommissionEnquiryEmail = "CommissionEnquiryEmail";
            public const string OtherName = "OtherName";
            public const string OtherPhone = "OtherPhone";
            public const string OtherEmail = "OtherEmail";
            public const string LastModifiedDate = "LastModifiedDate";
            public const string LastModifiedByUser = "LastModifiedByUser";
            public const string Deleted = "Deleted";
            public const string BranchID = "BranchID";

			static public string ToPropertyName(string columnName)
			{
				if(ht == null)
				{
					ht = new Hashtable();
					
					ht[ID] = _Networks.PropertyNames.ID;
					ht[NetworkName] = _Networks.PropertyNames.NetworkName;
					ht[DealerCode] = _Networks.PropertyNames.DealerCode;
					ht[PostalAddress] = _Networks.PropertyNames.PostalAddress;
					ht[DealerManagerName] = _Networks.PropertyNames.DealerManagerName;
					ht[DealerManagerPhone] = _Networks.PropertyNames.DealerManagerPhone;
					ht[DealerManagerEmail] = _Networks.PropertyNames.DealerManagerEmail;
					ht[CommissionEnquiryName] = _Networks.PropertyNames.CommissionEnquiryName;
					ht[CommissionEnquiryPhone] = _Networks.PropertyNames.CommissionEnquiryPhone;
					ht[CommissionEnquiryEmail] = _Networks.PropertyNames.CommissionEnquiryEmail;
					ht[OtherName] = _Networks.PropertyNames.OtherName;
					ht[OtherPhone] = _Networks.PropertyNames.OtherPhone;
					ht[OtherEmail] = _Networks.PropertyNames.OtherEmail;
					ht[LastModifiedDate] = _Networks.PropertyNames.LastModifiedDate;
					ht[LastModifiedByUser] = _Networks.PropertyNames.LastModifiedByUser;
					ht[Deleted] = _Networks.PropertyNames.Deleted;
					ht[BranchID] = _Networks.PropertyNames.BranchID;

				}
				return (string)ht[columnName];
			}

			static private Hashtable ht = null;			 
		}
		#endregion
		
		#region PropertyNames
		public class PropertyNames
		{  
            public const string ID = "ID";
            public const string NetworkName = "NetworkName";
            public const string DealerCode = "DealerCode";
            public const string PostalAddress = "PostalAddress";
            public const string DealerManagerName = "DealerManagerName";
            public const string DealerManagerPhone = "DealerManagerPhone";
            public const string DealerManagerEmail = "DealerManagerEmail";
            public const string CommissionEnquiryName = "CommissionEnquiryName";
            public const string CommissionEnquiryPhone = "CommissionEnquiryPhone";
            public const string CommissionEnquiryEmail = "CommissionEnquiryEmail";
            public const string OtherName = "OtherName";
            public const string OtherPhone = "OtherPhone";
            public const string OtherEmail = "OtherEmail";
            public const string LastModifiedDate = "LastModifiedDate";
            public const string LastModifiedByUser = "LastModifiedByUser";
            public const string Deleted = "Deleted";
            public const string BranchID = "BranchID";

			static public string ToColumnName(string propertyName)
			{
				if(ht == null)
				{
					ht = new Hashtable();
					
					ht[ID] = _Networks.ColumnNames.ID;
					ht[NetworkName] = _Networks.ColumnNames.NetworkName;
					ht[DealerCode] = _Networks.ColumnNames.DealerCode;
					ht[PostalAddress] = _Networks.ColumnNames.PostalAddress;
					ht[DealerManagerName] = _Networks.ColumnNames.DealerManagerName;
					ht[DealerManagerPhone] = _Networks.ColumnNames.DealerManagerPhone;
					ht[DealerManagerEmail] = _Networks.ColumnNames.DealerManagerEmail;
					ht[CommissionEnquiryName] = _Networks.ColumnNames.CommissionEnquiryName;
					ht[CommissionEnquiryPhone] = _Networks.ColumnNames.CommissionEnquiryPhone;
					ht[CommissionEnquiryEmail] = _Networks.ColumnNames.CommissionEnquiryEmail;
					ht[OtherName] = _Networks.ColumnNames.OtherName;
					ht[OtherPhone] = _Networks.ColumnNames.OtherPhone;
					ht[OtherEmail] = _Networks.ColumnNames.OtherEmail;
					ht[LastModifiedDate] = _Networks.ColumnNames.LastModifiedDate;
					ht[LastModifiedByUser] = _Networks.ColumnNames.LastModifiedByUser;
					ht[Deleted] = _Networks.ColumnNames.Deleted;
					ht[BranchID] = _Networks.ColumnNames.BranchID;

				}
				return (string)ht[propertyName];
			}

			static private Hashtable ht = null;			 
		}			 
		#endregion	

		#region StringPropertyNames
		public class StringPropertyNames
		{  
            public const string ID = "s_ID";
            public const string NetworkName = "s_NetworkName";
            public const string DealerCode = "s_DealerCode";
            public const string PostalAddress = "s_PostalAddress";
            public const string DealerManagerName = "s_DealerManagerName";
            public const string DealerManagerPhone = "s_DealerManagerPhone";
            public const string DealerManagerEmail = "s_DealerManagerEmail";
            public const string CommissionEnquiryName = "s_CommissionEnquiryName";
            public const string CommissionEnquiryPhone = "s_CommissionEnquiryPhone";
            public const string CommissionEnquiryEmail = "s_CommissionEnquiryEmail";
            public const string OtherName = "s_OtherName";
            public const string OtherPhone = "s_OtherPhone";
            public const string OtherEmail = "s_OtherEmail";
            public const string LastModifiedDate = "s_LastModifiedDate";
            public const string LastModifiedByUser = "s_LastModifiedByUser";
            public const string Deleted = "s_Deleted";
            public const string BranchID = "s_BranchID";

		}
		#endregion		
		
		#region Properties
	
		public virtual int ID
	    {
			get
	        {
				return base.Getint(ColumnNames.ID);
			}
			set
	        {
				base.Setint(ColumnNames.ID, value);
			}
		}

		public virtual string NetworkName
	    {
			get
	        {
				return base.Getstring(ColumnNames.NetworkName);
			}
			set
	        {
				base.Setstring(ColumnNames.NetworkName, value);
			}
		}

		public virtual string DealerCode
	    {
			get
	        {
				return base.Getstring(ColumnNames.DealerCode);
			}
			set
	        {
				base.Setstring(ColumnNames.DealerCode, value);
			}
		}

		public virtual string PostalAddress
	    {
			get
	        {
				return base.Getstring(ColumnNames.PostalAddress);
			}
			set
	        {
				base.Setstring(ColumnNames.PostalAddress, value);
			}
		}

		public virtual string DealerManagerName
	    {
			get
	        {
				return base.Getstring(ColumnNames.DealerManagerName);
			}
			set
	        {
				base.Setstring(ColumnNames.DealerManagerName, value);
			}
		}

		public virtual string DealerManagerPhone
	    {
			get
	        {
				return base.Getstring(ColumnNames.DealerManagerPhone);
			}
			set
	        {
				base.Setstring(ColumnNames.DealerManagerPhone, value);
			}
		}

		public virtual string DealerManagerEmail
	    {
			get
	        {
				return base.Getstring(ColumnNames.DealerManagerEmail);
			}
			set
	        {
				base.Setstring(ColumnNames.DealerManagerEmail, value);
			}
		}

		public virtual string CommissionEnquiryName
	    {
			get
	        {
				return base.Getstring(ColumnNames.CommissionEnquiryName);
			}
			set
	        {
				base.Setstring(ColumnNames.CommissionEnquiryName, value);
			}
		}

		public virtual string CommissionEnquiryPhone
	    {
			get
	        {
				return base.Getstring(ColumnNames.CommissionEnquiryPhone);
			}
			set
	        {
				base.Setstring(ColumnNames.CommissionEnquiryPhone, value);
			}
		}

		public virtual string CommissionEnquiryEmail
	    {
			get
	        {
				return base.Getstring(ColumnNames.CommissionEnquiryEmail);
			}
			set
	        {
				base.Setstring(ColumnNames.CommissionEnquiryEmail, value);
			}
		}

		public virtual string OtherName
	    {
			get
	        {
				return base.Getstring(ColumnNames.OtherName);
			}
			set
	        {
				base.Setstring(ColumnNames.OtherName, value);
			}
		}

		public virtual string OtherPhone
	    {
			get
	        {
				return base.Getstring(ColumnNames.OtherPhone);
			}
			set
	        {
				base.Setstring(ColumnNames.OtherPhone, value);
			}
		}

		public virtual string OtherEmail
	    {
			get
	        {
				return base.Getstring(ColumnNames.OtherEmail);
			}
			set
	        {
				base.Setstring(ColumnNames.OtherEmail, value);
			}
		}

		public virtual DateTime LastModifiedDate
	    {
			get
	        {
				return base.GetDateTime(ColumnNames.LastModifiedDate);
			}
			set
	        {
				base.SetDateTime(ColumnNames.LastModifiedDate, value);
			}
		}

		public virtual int LastModifiedByUser
	    {
			get
	        {
				return base.Getint(ColumnNames.LastModifiedByUser);
			}
			set
	        {
				base.Setint(ColumnNames.LastModifiedByUser, value);
			}
		}

		public virtual bool Deleted
	    {
			get
	        {
				return base.Getbool(ColumnNames.Deleted);
			}
			set
	        {
				base.Setbool(ColumnNames.Deleted, value);
			}
		}

		public virtual int BranchID
	    {
			get
	        {
				return base.Getint(ColumnNames.BranchID);
			}
			set
	        {
				base.Setint(ColumnNames.BranchID, value);
			}
		}


		#endregion
		
		#region String Properties
	
		public virtual string s_ID
	    {
			get
	        {
				return this.IsColumnNull(ColumnNames.ID) ? string.Empty : base.GetintAsString(ColumnNames.ID);
			}
			set
	        {
				if(string.Empty == value)
					this.SetColumnNull(ColumnNames.ID);
				else
					this.ID = base.SetintAsString(ColumnNames.ID, value);
			}
		}

		public virtual string s_NetworkName
	    {
			get
	        {
				return this.IsColumnNull(ColumnNames.NetworkName) ? string.Empty : base.GetstringAsString(ColumnNames.NetworkName);
			}
			set
	        {
				if(string.Empty == value)
					this.SetColumnNull(ColumnNames.NetworkName);
				else
					this.NetworkName = base.SetstringAsString(ColumnNames.NetworkName, value);
			}
		}

		public virtual string s_DealerCode
	    {
			get
	        {
				return this.IsColumnNull(ColumnNames.DealerCode) ? string.Empty : base.GetstringAsString(ColumnNames.DealerCode);
			}
			set
	        {
				if(string.Empty == value)
					this.SetColumnNull(ColumnNames.DealerCode);
				else
					this.DealerCode = base.SetstringAsString(ColumnNames.DealerCode, value);
			}
		}

		public virtual string s_PostalAddress
	    {
			get
	        {
				return this.IsColumnNull(ColumnNames.PostalAddress) ? string.Empty : base.GetstringAsString(ColumnNames.PostalAddress);
			}
			set
	        {
				if(string.Empty == value)
					this.SetColumnNull(ColumnNames.PostalAddress);
				else
					this.PostalAddress = base.SetstringAsString(ColumnNames.PostalAddress, value);
			}
		}

		public virtual string s_DealerManagerName
	    {
			get
	        {
				return this.IsColumnNull(ColumnNames.DealerManagerName) ? string.Empty : base.GetstringAsString(ColumnNames.DealerManagerName);
			}
			set
	        {
				if(string.Empty == value)
					this.SetColumnNull(ColumnNames.DealerManagerName);
				else
					this.DealerManagerName = base.SetstringAsString(ColumnNames.DealerManagerName, value);
			}
		}

		public virtual string s_DealerManagerPhone
	    {
			get
	        {
				return this.IsColumnNull(ColumnNames.DealerManagerPhone) ? string.Empty : base.GetstringAsString(ColumnNames.DealerManagerPhone);
			}
			set
	        {
				if(string.Empty == value)
					this.SetColumnNull(ColumnNames.DealerManagerPhone);
				else
					this.DealerManagerPhone = base.SetstringAsString(ColumnNames.DealerManagerPhone, value);
			}
		}

		public virtual string s_DealerManagerEmail
	    {
			get
	        {
				return this.IsColumnNull(ColumnNames.DealerManagerEmail) ? string.Empty : base.GetstringAsString(ColumnNames.DealerManagerEmail);
			}
			set
	        {
				if(string.Empty == value)
					this.SetColumnNull(ColumnNames.DealerManagerEmail);
				else
					this.DealerManagerEmail = base.SetstringAsString(ColumnNames.DealerManagerEmail, value);
			}
		}

		public virtual string s_CommissionEnquiryName
	    {
			get
	        {
				return this.IsColumnNull(ColumnNames.CommissionEnquiryName) ? string.Empty : base.GetstringAsString(ColumnNames.CommissionEnquiryName);
			}
			set
	        {
				if(string.Empty == value)
					this.SetColumnNull(ColumnNames.CommissionEnquiryName);
				else
					this.CommissionEnquiryName = base.SetstringAsString(ColumnNames.CommissionEnquiryName, value);
			}
		}

		public virtual string s_CommissionEnquiryPhone
	    {
			get
	        {
				return this.IsColumnNull(ColumnNames.CommissionEnquiryPhone) ? string.Empty : base.GetstringAsString(ColumnNames.CommissionEnquiryPhone);
			}
			set
	        {
				if(string.Empty == value)
					this.SetColumnNull(ColumnNames.CommissionEnquiryPhone);
				else
					this.CommissionEnquiryPhone = base.SetstringAsString(ColumnNames.CommissionEnquiryPhone, value);
			}
		}

		public virtual string s_CommissionEnquiryEmail
	    {
			get
	        {
				return this.IsColumnNull(ColumnNames.CommissionEnquiryEmail) ? string.Empty : base.GetstringAsString(ColumnNames.CommissionEnquiryEmail);
			}
			set
	        {
				if(string.Empty == value)
					this.SetColumnNull(ColumnNames.CommissionEnquiryEmail);
				else
					this.CommissionEnquiryEmail = base.SetstringAsString(ColumnNames.CommissionEnquiryEmail, value);
			}
		}

		public virtual string s_OtherName
	    {
			get
	        {
				return this.IsColumnNull(ColumnNames.OtherName) ? string.Empty : base.GetstringAsString(ColumnNames.OtherName);
			}
			set
	        {
				if(string.Empty == value)
					this.SetColumnNull(ColumnNames.OtherName);
				else
					this.OtherName = base.SetstringAsString(ColumnNames.OtherName, value);
			}
		}

		public virtual string s_OtherPhone
	    {
			get
	        {
				return this.IsColumnNull(ColumnNames.OtherPhone) ? string.Empty : base.GetstringAsString(ColumnNames.OtherPhone);
			}
			set
	        {
				if(string.Empty == value)
					this.SetColumnNull(ColumnNames.OtherPhone);
				else
					this.OtherPhone = base.SetstringAsString(ColumnNames.OtherPhone, value);
			}
		}

		public virtual string s_OtherEmail
	    {
			get
	        {
				return this.IsColumnNull(ColumnNames.OtherEmail) ? string.Empty : base.GetstringAsString(ColumnNames.OtherEmail);
			}
			set
	        {
				if(string.Empty == value)
					this.SetColumnNull(ColumnNames.OtherEmail);
				else
					this.OtherEmail = base.SetstringAsString(ColumnNames.OtherEmail, value);
			}
		}

		public virtual string s_LastModifiedDate
	    {
			get
	        {
				return this.IsColumnNull(ColumnNames.LastModifiedDate) ? string.Empty : base.GetDateTimeAsString(ColumnNames.LastModifiedDate);
			}
			set
	        {
				if(string.Empty == value)
					this.SetColumnNull(ColumnNames.LastModifiedDate);
				else
					this.LastModifiedDate = base.SetDateTimeAsString(ColumnNames.LastModifiedDate, value);
			}
		}

		public virtual string s_LastModifiedByUser
	    {
			get
	        {
				return this.IsColumnNull(ColumnNames.LastModifiedByUser) ? string.Empty : base.GetintAsString(ColumnNames.LastModifiedByUser);
			}
			set
	        {
				if(string.Empty == value)
					this.SetColumnNull(ColumnNames.LastModifiedByUser);
				else
					this.LastModifiedByUser = base.SetintAsString(ColumnNames.LastModifiedByUser, value);
			}
		}

		public virtual string s_Deleted
	    {
			get
	        {
				return this.IsColumnNull(ColumnNames.Deleted) ? string.Empty : base.GetboolAsString(ColumnNames.Deleted);
			}
			set
	        {
				if(string.Empty == value)
					this.SetColumnNull(ColumnNames.Deleted);
				else
					this.Deleted = base.SetboolAsString(ColumnNames.Deleted, value);
			}
		}

		public virtual string s_BranchID
	    {
			get
	        {
				return this.IsColumnNull(ColumnNames.BranchID) ? string.Empty : base.GetintAsString(ColumnNames.BranchID);
			}
			set
	        {
				if(string.Empty == value)
					this.SetColumnNull(ColumnNames.BranchID);
				else
					this.BranchID = base.SetintAsString(ColumnNames.BranchID, value);
			}
		}


		#endregion		
	
		#region Where Clause
		public class WhereClause
		{
			public WhereClause(BusinessEntity entity)
			{
				this._entity = entity;
			}
			
			public TearOffWhereParameter TearOff
			{
				get
				{
					if(_tearOff == null)
					{
						_tearOff = new TearOffWhereParameter(this);
					}

					return _tearOff;
				}
			}

			#region WhereParameter TearOff's
			public class TearOffWhereParameter
			{
				public TearOffWhereParameter(WhereClause clause)
				{
					this._clause = clause;
				}
				
				
				public WhereParameter ID
				{
					get
					{
							WhereParameter where = new WhereParameter(ColumnNames.ID, Parameters.ID);
							this._clause._entity.Query.AddWhereParameter(where);
							return where;
					}
				}

				public WhereParameter NetworkName
				{
					get
					{
							WhereParameter where = new WhereParameter(ColumnNames.NetworkName, Parameters.NetworkName);
							this._clause._entity.Query.AddWhereParameter(where);
							return where;
					}
				}

				public WhereParameter DealerCode
				{
					get
					{
							WhereParameter where = new WhereParameter(ColumnNames.DealerCode, Parameters.DealerCode);
							this._clause._entity.Query.AddWhereParameter(where);
							return where;
					}
				}

				public WhereParameter PostalAddress
				{
					get
					{
							WhereParameter where = new WhereParameter(ColumnNames.PostalAddress, Parameters.PostalAddress);
							this._clause._entity.Query.AddWhereParameter(where);
							return where;
					}
				}

				public WhereParameter DealerManagerName
				{
					get
					{
							WhereParameter where = new WhereParameter(ColumnNames.DealerManagerName, Parameters.DealerManagerName);
							this._clause._entity.Query.AddWhereParameter(where);
							return where;
					}
				}

				public WhereParameter DealerManagerPhone
				{
					get
					{
							WhereParameter where = new WhereParameter(ColumnNames.DealerManagerPhone, Parameters.DealerManagerPhone);
							this._clause._entity.Query.AddWhereParameter(where);
							return where;
					}
				}

				public WhereParameter DealerManagerEmail
				{
					get
					{
							WhereParameter where = new WhereParameter(ColumnNames.DealerManagerEmail, Parameters.DealerManagerEmail);
							this._clause._entity.Query.AddWhereParameter(where);
							return where;
					}
				}

				public WhereParameter CommissionEnquiryName
				{
					get
					{
							WhereParameter where = new WhereParameter(ColumnNames.CommissionEnquiryName, Parameters.CommissionEnquiryName);
							this._clause._entity.Query.AddWhereParameter(where);
							return where;
					}
				}

				public WhereParameter CommissionEnquiryPhone
				{
					get
					{
							WhereParameter where = new WhereParameter(ColumnNames.CommissionEnquiryPhone, Parameters.CommissionEnquiryPhone);
							this._clause._entity.Query.AddWhereParameter(where);
							return where;
					}
				}

				public WhereParameter CommissionEnquiryEmail
				{
					get
					{
							WhereParameter where = new WhereParameter(ColumnNames.CommissionEnquiryEmail, Parameters.CommissionEnquiryEmail);
							this._clause._entity.Query.AddWhereParameter(where);
							return where;
					}
				}

				public WhereParameter OtherName
				{
					get
					{
							WhereParameter where = new WhereParameter(ColumnNames.OtherName, Parameters.OtherName);
							this._clause._entity.Query.AddWhereParameter(where);
							return where;
					}
				}

				public WhereParameter OtherPhone
				{
					get
					{
							WhereParameter where = new WhereParameter(ColumnNames.OtherPhone, Parameters.OtherPhone);
							this._clause._entity.Query.AddWhereParameter(where);
							return where;
					}
				}

				public WhereParameter OtherEmail
				{
					get
					{
							WhereParameter where = new WhereParameter(ColumnNames.OtherEmail, Parameters.OtherEmail);
							this._clause._entity.Query.AddWhereParameter(where);
							return where;
					}
				}

				public WhereParameter LastModifiedDate
				{
					get
					{
							WhereParameter where = new WhereParameter(ColumnNames.LastModifiedDate, Parameters.LastModifiedDate);
							this._clause._entity.Query.AddWhereParameter(where);
							return where;
					}
				}

				public WhereParameter LastModifiedByUser
				{
					get
					{
							WhereParameter where = new WhereParameter(ColumnNames.LastModifiedByUser, Parameters.LastModifiedByUser);
							this._clause._entity.Query.AddWhereParameter(where);
							return where;
					}
				}

				public WhereParameter Deleted
				{
					get
					{
							WhereParameter where = new WhereParameter(ColumnNames.Deleted, Parameters.Deleted);
							this._clause._entity.Query.AddWhereParameter(where);
							return where;
					}
				}

				public WhereParameter BranchID
				{
					get
					{
							WhereParameter where = new WhereParameter(ColumnNames.BranchID, Parameters.BranchID);
							this._clause._entity.Query.AddWhereParameter(where);
							return where;
					}
				}


				private WhereClause _clause;
			}
			#endregion
		
			public WhereParameter ID
		    {
				get
		        {
					if(_ID_W == null)
	        	    {
						_ID_W = TearOff.ID;
					}
					return _ID_W;
				}
			}

			public WhereParameter NetworkName
		    {
				get
		        {
					if(_NetworkName_W == null)
	        	    {
						_NetworkName_W = TearOff.NetworkName;
					}
					return _NetworkName_W;
				}
			}

			public WhereParameter DealerCode
		    {
				get
		        {
					if(_DealerCode_W == null)
	        	    {
						_DealerCode_W = TearOff.DealerCode;
					}
					return _DealerCode_W;
				}
			}

			public WhereParameter PostalAddress
		    {
				get
		        {
					if(_PostalAddress_W == null)
	        	    {
						_PostalAddress_W = TearOff.PostalAddress;
					}
					return _PostalAddress_W;
				}
			}

			public WhereParameter DealerManagerName
		    {
				get
		        {
					if(_DealerManagerName_W == null)
	        	    {
						_DealerManagerName_W = TearOff.DealerManagerName;
					}
					return _DealerManagerName_W;
				}
			}

			public WhereParameter DealerManagerPhone
		    {
				get
		        {
					if(_DealerManagerPhone_W == null)
	        	    {
						_DealerManagerPhone_W = TearOff.DealerManagerPhone;
					}
					return _DealerManagerPhone_W;
				}
			}

			public WhereParameter DealerManagerEmail
		    {
				get
		        {
					if(_DealerManagerEmail_W == null)
	        	    {
						_DealerManagerEmail_W = TearOff.DealerManagerEmail;
					}
					return _DealerManagerEmail_W;
				}
			}

			public WhereParameter CommissionEnquiryName
		    {
				get
		        {
					if(_CommissionEnquiryName_W == null)
	        	    {
						_CommissionEnquiryName_W = TearOff.CommissionEnquiryName;
					}
					return _CommissionEnquiryName_W;
				}
			}

			public WhereParameter CommissionEnquiryPhone
		    {
				get
		        {
					if(_CommissionEnquiryPhone_W == null)
	        	    {
						_CommissionEnquiryPhone_W = TearOff.CommissionEnquiryPhone;
					}
					return _CommissionEnquiryPhone_W;
				}
			}

			public WhereParameter CommissionEnquiryEmail
		    {
				get
		        {
					if(_CommissionEnquiryEmail_W == null)
	        	    {
						_CommissionEnquiryEmail_W = TearOff.CommissionEnquiryEmail;
					}
					return _CommissionEnquiryEmail_W;
				}
			}

			public WhereParameter OtherName
		    {
				get
		        {
					if(_OtherName_W == null)
	        	    {
						_OtherName_W = TearOff.OtherName;
					}
					return _OtherName_W;
				}
			}

			public WhereParameter OtherPhone
		    {
				get
		        {
					if(_OtherPhone_W == null)
	        	    {
						_OtherPhone_W = TearOff.OtherPhone;
					}
					return _OtherPhone_W;
				}
			}

			public WhereParameter OtherEmail
		    {
				get
		        {
					if(_OtherEmail_W == null)
	        	    {
						_OtherEmail_W = TearOff.OtherEmail;
					}
					return _OtherEmail_W;
				}
			}

			public WhereParameter LastModifiedDate
		    {
				get
		        {
					if(_LastModifiedDate_W == null)
	        	    {
						_LastModifiedDate_W = TearOff.LastModifiedDate;
					}
					return _LastModifiedDate_W;
				}
			}

			public WhereParameter LastModifiedByUser
		    {
				get
		        {
					if(_LastModifiedByUser_W == null)
	        	    {
						_LastModifiedByUser_W = TearOff.LastModifiedByUser;
					}
					return _LastModifiedByUser_W;
				}
			}

			public WhereParameter Deleted
		    {
				get
		        {
					if(_Deleted_W == null)
	        	    {
						_Deleted_W = TearOff.Deleted;
					}
					return _Deleted_W;
				}
			}

			public WhereParameter BranchID
		    {
				get
		        {
					if(_BranchID_W == null)
	        	    {
						_BranchID_W = TearOff.BranchID;
					}
					return _BranchID_W;
				}
			}

			private WhereParameter _ID_W = null;
			private WhereParameter _NetworkName_W = null;
			private WhereParameter _DealerCode_W = null;
			private WhereParameter _PostalAddress_W = null;
			private WhereParameter _DealerManagerName_W = null;
			private WhereParameter _DealerManagerPhone_W = null;
			private WhereParameter _DealerManagerEmail_W = null;
			private WhereParameter _CommissionEnquiryName_W = null;
			private WhereParameter _CommissionEnquiryPhone_W = null;
			private WhereParameter _CommissionEnquiryEmail_W = null;
			private WhereParameter _OtherName_W = null;
			private WhereParameter _OtherPhone_W = null;
			private WhereParameter _OtherEmail_W = null;
			private WhereParameter _LastModifiedDate_W = null;
			private WhereParameter _LastModifiedByUser_W = null;
			private WhereParameter _Deleted_W = null;
			private WhereParameter _BranchID_W = null;

			public void WhereClauseReset()
			{
				_ID_W = null;
				_NetworkName_W = null;
				_DealerCode_W = null;
				_PostalAddress_W = null;
				_DealerManagerName_W = null;
				_DealerManagerPhone_W = null;
				_DealerManagerEmail_W = null;
				_CommissionEnquiryName_W = null;
				_CommissionEnquiryPhone_W = null;
				_CommissionEnquiryEmail_W = null;
				_OtherName_W = null;
				_OtherPhone_W = null;
				_OtherEmail_W = null;
				_LastModifiedDate_W = null;
				_LastModifiedByUser_W = null;
				_Deleted_W = null;
				_BranchID_W = null;

				this._entity.Query.FlushWhereParameters();

			}
	
			private BusinessEntity _entity;
			private TearOffWhereParameter _tearOff;
			
		}
	
		public WhereClause Where
		{
			get
			{
				if(_whereClause == null)
				{
					_whereClause = new WhereClause(this);
				}
		
				return _whereClause;
			}
		}
		
		private WhereClause _whereClause = null;	
		#endregion
	
		#region Aggregate Clause
		public class AggregateClause
		{
			public AggregateClause(BusinessEntity entity)
			{
				this._entity = entity;
			}
			
			public TearOffAggregateParameter TearOff
			{
				get
				{
					if(_tearOff == null)
					{
						_tearOff = new TearOffAggregateParameter(this);
					}

					return _tearOff;
				}
			}

			#region AggregateParameter TearOff's
			public class TearOffAggregateParameter
			{
				public TearOffAggregateParameter(AggregateClause clause)
				{
					this._clause = clause;
				}
				
				
				public AggregateParameter ID
				{
					get
					{
							AggregateParameter aggregate = new AggregateParameter(ColumnNames.ID, Parameters.ID);
							this._clause._entity.Query.AddAggregateParameter(aggregate);
							return aggregate;
					}
				}

				public AggregateParameter NetworkName
				{
					get
					{
							AggregateParameter aggregate = new AggregateParameter(ColumnNames.NetworkName, Parameters.NetworkName);
							this._clause._entity.Query.AddAggregateParameter(aggregate);
							return aggregate;
					}
				}

				public AggregateParameter DealerCode
				{
					get
					{
							AggregateParameter aggregate = new AggregateParameter(ColumnNames.DealerCode, Parameters.DealerCode);
							this._clause._entity.Query.AddAggregateParameter(aggregate);
							return aggregate;
					}
				}

				public AggregateParameter PostalAddress
				{
					get
					{
							AggregateParameter aggregate = new AggregateParameter(ColumnNames.PostalAddress, Parameters.PostalAddress);
							this._clause._entity.Query.AddAggregateParameter(aggregate);
							return aggregate;
					}
				}

				public AggregateParameter DealerManagerName
				{
					get
					{
							AggregateParameter aggregate = new AggregateParameter(ColumnNames.DealerManagerName, Parameters.DealerManagerName);
							this._clause._entity.Query.AddAggregateParameter(aggregate);
							return aggregate;
					}
				}

				public AggregateParameter DealerManagerPhone
				{
					get
					{
							AggregateParameter aggregate = new AggregateParameter(ColumnNames.DealerManagerPhone, Parameters.DealerManagerPhone);
							this._clause._entity.Query.AddAggregateParameter(aggregate);
							return aggregate;
					}
				}

				public AggregateParameter DealerManagerEmail
				{
					get
					{
							AggregateParameter aggregate = new AggregateParameter(ColumnNames.DealerManagerEmail, Parameters.DealerManagerEmail);
							this._clause._entity.Query.AddAggregateParameter(aggregate);
							return aggregate;
					}
				}

				public AggregateParameter CommissionEnquiryName
				{
					get
					{
							AggregateParameter aggregate = new AggregateParameter(ColumnNames.CommissionEnquiryName, Parameters.CommissionEnquiryName);
							this._clause._entity.Query.AddAggregateParameter(aggregate);
							return aggregate;
					}
				}

				public AggregateParameter CommissionEnquiryPhone
				{
					get
					{
							AggregateParameter aggregate = new AggregateParameter(ColumnNames.CommissionEnquiryPhone, Parameters.CommissionEnquiryPhone);
							this._clause._entity.Query.AddAggregateParameter(aggregate);
							return aggregate;
					}
				}

				public AggregateParameter CommissionEnquiryEmail
				{
					get
					{
							AggregateParameter aggregate = new AggregateParameter(ColumnNames.CommissionEnquiryEmail, Parameters.CommissionEnquiryEmail);
							this._clause._entity.Query.AddAggregateParameter(aggregate);
							return aggregate;
					}
				}

				public AggregateParameter OtherName
				{
					get
					{
							AggregateParameter aggregate = new AggregateParameter(ColumnNames.OtherName, Parameters.OtherName);
							this._clause._entity.Query.AddAggregateParameter(aggregate);
							return aggregate;
					}
				}

				public AggregateParameter OtherPhone
				{
					get
					{
							AggregateParameter aggregate = new AggregateParameter(ColumnNames.OtherPhone, Parameters.OtherPhone);
							this._clause._entity.Query.AddAggregateParameter(aggregate);
							return aggregate;
					}
				}

				public AggregateParameter OtherEmail
				{
					get
					{
							AggregateParameter aggregate = new AggregateParameter(ColumnNames.OtherEmail, Parameters.OtherEmail);
							this._clause._entity.Query.AddAggregateParameter(aggregate);
							return aggregate;
					}
				}

				public AggregateParameter LastModifiedDate
				{
					get
					{
							AggregateParameter aggregate = new AggregateParameter(ColumnNames.LastModifiedDate, Parameters.LastModifiedDate);
							this._clause._entity.Query.AddAggregateParameter(aggregate);
							return aggregate;
					}
				}

				public AggregateParameter LastModifiedByUser
				{
					get
					{
							AggregateParameter aggregate = new AggregateParameter(ColumnNames.LastModifiedByUser, Parameters.LastModifiedByUser);
							this._clause._entity.Query.AddAggregateParameter(aggregate);
							return aggregate;
					}
				}

				public AggregateParameter Deleted
				{
					get
					{
							AggregateParameter aggregate = new AggregateParameter(ColumnNames.Deleted, Parameters.Deleted);
							this._clause._entity.Query.AddAggregateParameter(aggregate);
							return aggregate;
					}
				}

				public AggregateParameter BranchID
				{
					get
					{
							AggregateParameter aggregate = new AggregateParameter(ColumnNames.BranchID, Parameters.BranchID);
							this._clause._entity.Query.AddAggregateParameter(aggregate);
							return aggregate;
					}
				}


				private AggregateClause _clause;
			}
			#endregion
		
			public AggregateParameter ID
		    {
				get
		        {
					if(_ID_W == null)
	        	    {
						_ID_W = TearOff.ID;
					}
					return _ID_W;
				}
			}

			public AggregateParameter NetworkName
		    {
				get
		        {
					if(_NetworkName_W == null)
	        	    {
						_NetworkName_W = TearOff.NetworkName;
					}
					return _NetworkName_W;
				}
			}

			public AggregateParameter DealerCode
		    {
				get
		        {
					if(_DealerCode_W == null)
	        	    {
						_DealerCode_W = TearOff.DealerCode;
					}
					return _DealerCode_W;
				}
			}

			public AggregateParameter PostalAddress
		    {
				get
		        {
					if(_PostalAddress_W == null)
	        	    {
						_PostalAddress_W = TearOff.PostalAddress;
					}
					return _PostalAddress_W;
				}
			}

			public AggregateParameter DealerManagerName
		    {
				get
		        {
					if(_DealerManagerName_W == null)
	        	    {
						_DealerManagerName_W = TearOff.DealerManagerName;
					}
					return _DealerManagerName_W;
				}
			}

			public AggregateParameter DealerManagerPhone
		    {
				get
		        {
					if(_DealerManagerPhone_W == null)
	        	    {
						_DealerManagerPhone_W = TearOff.DealerManagerPhone;
					}
					return _DealerManagerPhone_W;
				}
			}

			public AggregateParameter DealerManagerEmail
		    {
				get
		        {
					if(_DealerManagerEmail_W == null)
	        	    {
						_DealerManagerEmail_W = TearOff.DealerManagerEmail;
					}
					return _DealerManagerEmail_W;
				}
			}

			public AggregateParameter CommissionEnquiryName
		    {
				get
		        {
					if(_CommissionEnquiryName_W == null)
	        	    {
						_CommissionEnquiryName_W = TearOff.CommissionEnquiryName;
					}
					return _CommissionEnquiryName_W;
				}
			}

			public AggregateParameter CommissionEnquiryPhone
		    {
				get
		        {
					if(_CommissionEnquiryPhone_W == null)
	        	    {
						_CommissionEnquiryPhone_W = TearOff.CommissionEnquiryPhone;
					}
					return _CommissionEnquiryPhone_W;
				}
			}

			public AggregateParameter CommissionEnquiryEmail
		    {
				get
		        {
					if(_CommissionEnquiryEmail_W == null)
	        	    {
						_CommissionEnquiryEmail_W = TearOff.CommissionEnquiryEmail;
					}
					return _CommissionEnquiryEmail_W;
				}
			}

			public AggregateParameter OtherName
		    {
				get
		        {
					if(_OtherName_W == null)
	        	    {
						_OtherName_W = TearOff.OtherName;
					}
					return _OtherName_W;
				}
			}

			public AggregateParameter OtherPhone
		    {
				get
		        {
					if(_OtherPhone_W == null)
	        	    {
						_OtherPhone_W = TearOff.OtherPhone;
					}
					return _OtherPhone_W;
				}
			}

			public AggregateParameter OtherEmail
		    {
				get
		        {
					if(_OtherEmail_W == null)
	        	    {
						_OtherEmail_W = TearOff.OtherEmail;
					}
					return _OtherEmail_W;
				}
			}

			public AggregateParameter LastModifiedDate
		    {
				get
		        {
					if(_LastModifiedDate_W == null)
	        	    {
						_LastModifiedDate_W = TearOff.LastModifiedDate;
					}
					return _LastModifiedDate_W;
				}
			}

			public AggregateParameter LastModifiedByUser
		    {
				get
		        {
					if(_LastModifiedByUser_W == null)
	        	    {
						_LastModifiedByUser_W = TearOff.LastModifiedByUser;
					}
					return _LastModifiedByUser_W;
				}
			}

			public AggregateParameter Deleted
		    {
				get
		        {
					if(_Deleted_W == null)
	        	    {
						_Deleted_W = TearOff.Deleted;
					}
					return _Deleted_W;
				}
			}

			public AggregateParameter BranchID
		    {
				get
		        {
					if(_BranchID_W == null)
	        	    {
						_BranchID_W = TearOff.BranchID;
					}
					return _BranchID_W;
				}
			}

			private AggregateParameter _ID_W = null;
			private AggregateParameter _NetworkName_W = null;
			private AggregateParameter _DealerCode_W = null;
			private AggregateParameter _PostalAddress_W = null;
			private AggregateParameter _DealerManagerName_W = null;
			private AggregateParameter _DealerManagerPhone_W = null;
			private AggregateParameter _DealerManagerEmail_W = null;
			private AggregateParameter _CommissionEnquiryName_W = null;
			private AggregateParameter _CommissionEnquiryPhone_W = null;
			private AggregateParameter _CommissionEnquiryEmail_W = null;
			private AggregateParameter _OtherName_W = null;
			private AggregateParameter _OtherPhone_W = null;
			private AggregateParameter _OtherEmail_W = null;
			private AggregateParameter _LastModifiedDate_W = null;
			private AggregateParameter _LastModifiedByUser_W = null;
			private AggregateParameter _Deleted_W = null;
			private AggregateParameter _BranchID_W = null;

			public void AggregateClauseReset()
			{
				_ID_W = null;
				_NetworkName_W = null;
				_DealerCode_W = null;
				_PostalAddress_W = null;
				_DealerManagerName_W = null;
				_DealerManagerPhone_W = null;
				_DealerManagerEmail_W = null;
				_CommissionEnquiryName_W = null;
				_CommissionEnquiryPhone_W = null;
				_CommissionEnquiryEmail_W = null;
				_OtherName_W = null;
				_OtherPhone_W = null;
				_OtherEmail_W = null;
				_LastModifiedDate_W = null;
				_LastModifiedByUser_W = null;
				_Deleted_W = null;
				_BranchID_W = null;

				this._entity.Query.FlushAggregateParameters();

			}
	
			private BusinessEntity _entity;
			private TearOffAggregateParameter _tearOff;
			
		}
	
		public AggregateClause Aggregate
		{
			get
			{
				if(_aggregateClause == null)
				{
					_aggregateClause = new AggregateClause(this);
				}
		
				return _aggregateClause;
			}
		}
		
		private AggregateClause _aggregateClause = null;	
		#endregion
	
		protected override IDbCommand GetInsertCommand() 
		{
		
			SqlCommand cmd = new SqlCommand();
			cmd.CommandType = CommandType.StoredProcedure;
			cmd.CommandText = "[" + this.SchemaStoredProcedure + "proc_NetworksInsert]";
	
			CreateParameters(cmd);
			
			SqlParameter p;
			p = cmd.Parameters[Parameters.ID.ParameterName];
			p.Direction = ParameterDirection.Output;
    
			return cmd;
		}
	
		protected override IDbCommand GetUpdateCommand()
		{
		
			SqlCommand cmd = new SqlCommand();
			cmd.CommandType = CommandType.StoredProcedure;
			cmd.CommandText = "[" + this.SchemaStoredProcedure + "proc_NetworksUpdate]";
	
			CreateParameters(cmd);
			      
			return cmd;
		}
	
		protected override IDbCommand GetDeleteCommand()
		{
		
			SqlCommand cmd = new SqlCommand();
			cmd.CommandType = CommandType.StoredProcedure;
			cmd.CommandText = "[" + this.SchemaStoredProcedure + "proc_NetworksDelete]";
	
			SqlParameter p;
			p = cmd.Parameters.Add(Parameters.ID);
			p.SourceColumn = ColumnNames.ID;
			p.SourceVersion = DataRowVersion.Current;

  
			return cmd;
		}
		
		private IDbCommand CreateParameters(SqlCommand cmd)
		{
			SqlParameter p;
		
			p = cmd.Parameters.Add(Parameters.ID);
			p.SourceColumn = ColumnNames.ID;
			p.SourceVersion = DataRowVersion.Current;

			p = cmd.Parameters.Add(Parameters.NetworkName);
			p.SourceColumn = ColumnNames.NetworkName;
			p.SourceVersion = DataRowVersion.Current;

			p = cmd.Parameters.Add(Parameters.DealerCode);
			p.SourceColumn = ColumnNames.DealerCode;
			p.SourceVersion = DataRowVersion.Current;

			p = cmd.Parameters.Add(Parameters.PostalAddress);
			p.SourceColumn = ColumnNames.PostalAddress;
			p.SourceVersion = DataRowVersion.Current;

			p = cmd.Parameters.Add(Parameters.DealerManagerName);
			p.SourceColumn = ColumnNames.DealerManagerName;
			p.SourceVersion = DataRowVersion.Current;

			p = cmd.Parameters.Add(Parameters.DealerManagerPhone);
			p.SourceColumn = ColumnNames.DealerManagerPhone;
			p.SourceVersion = DataRowVersion.Current;

			p = cmd.Parameters.Add(Parameters.DealerManagerEmail);
			p.SourceColumn = ColumnNames.DealerManagerEmail;
			p.SourceVersion = DataRowVersion.Current;

			p = cmd.Parameters.Add(Parameters.CommissionEnquiryName);
			p.SourceColumn = ColumnNames.CommissionEnquiryName;
			p.SourceVersion = DataRowVersion.Current;

			p = cmd.Parameters.Add(Parameters.CommissionEnquiryPhone);
			p.SourceColumn = ColumnNames.CommissionEnquiryPhone;
			p.SourceVersion = DataRowVersion.Current;

			p = cmd.Parameters.Add(Parameters.CommissionEnquiryEmail);
			p.SourceColumn = ColumnNames.CommissionEnquiryEmail;
			p.SourceVersion = DataRowVersion.Current;

			p = cmd.Parameters.Add(Parameters.OtherName);
			p.SourceColumn = ColumnNames.OtherName;
			p.SourceVersion = DataRowVersion.Current;

			p = cmd.Parameters.Add(Parameters.OtherPhone);
			p.SourceColumn = ColumnNames.OtherPhone;
			p.SourceVersion = DataRowVersion.Current;

			p = cmd.Parameters.Add(Parameters.OtherEmail);
			p.SourceColumn = ColumnNames.OtherEmail;
			p.SourceVersion = DataRowVersion.Current;

			p = cmd.Parameters.Add(Parameters.LastModifiedDate);
			p.SourceColumn = ColumnNames.LastModifiedDate;
			p.SourceVersion = DataRowVersion.Current;

			p = cmd.Parameters.Add(Parameters.LastModifiedByUser);
			p.SourceColumn = ColumnNames.LastModifiedByUser;
			p.SourceVersion = DataRowVersion.Current;

			p = cmd.Parameters.Add(Parameters.Deleted);
			p.SourceColumn = ColumnNames.Deleted;
			p.SourceVersion = DataRowVersion.Current;

			p = cmd.Parameters.Add(Parameters.BranchID);
			p.SourceColumn = ColumnNames.BranchID;
			p.SourceVersion = DataRowVersion.Current;


			return cmd;
		}
	}
}
